package com.dsr.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel("(OrderBean)实体类")
public class OrderBean implements Serializable {
    private  String id;

    private String address;

    private String addressInfo;

    private String userIphone;

    private String userName;

    private String blessing;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date createDate;

    private Integer state;

    private String distributeTime;

    private Integer hasVip;

    private String nickName;

    private String iphone;

    private Double price;

    private Integer number;

    private String flowerId;

    private String imgUrl;

    private String title;

    private String userId;

    private String remark;

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        if(StringUtils.isNotEmpty(imgUrl))
            this.imgUrl=imgUrl.split(",")[0];
        else
            this.imgUrl = null;
    }

}
